import request from '/@/utils/request';

// 查询用户地址列表
export function listAddress(query?: Object) {
  return request({
    url: '/module/wx/user/address/list',
    method: 'get',
    params: query
  })
}

// 查询用户地址详细
export function getAddress(id?: number) {
  return request({
    url: '/module/wx/user/address/' + id,
    method: 'get'
  })
}

// 新增用户地址
export function addAddress(data?: Object) {
  return request({
    url: '/module/wx/user/address',
    method: 'post',
    data: data
  })
}

// 修改用户地址
export function updateAddress(data?: Object) {
  return request({
    url: '/module/wx/user/address',
    method: 'put',
    data: data
  })
}

// 删除用户地址
export function delAddress(id?: number) {
  return request({
    url: '/module/wx/user/address/' + id,
    method: 'delete'
  })
}

// 导出用户地址
export function exportAddress(query?: Object) {
  return request({
    url: '/module/wx/user/address/export',
    method: 'get',
    params: query
  })
}
